﻿namespace GameDesigner
{
    public interface IAnimationHandler
    {
        void OnInit();
        /// <summary>
        /// 设置内部参数
        /// </summary>
        /// <param name="target"></param>
        void SetParams(params object[] args);
        /// <summary>
        /// 当播放动画方法
        /// </summary>
        /// <param name="state">当前状态</param>
        /// <param name="stateAction">当前动作</param>
        void OnPlayAnimation(State state, StateAction stateAction);
        /// <summary>
        /// 当动画每帧更新
        /// </summary>
        /// <param name="state">当前状态</param>
        /// <param name="stateAction">当前动作</param>
        /// <param name="currMode">当前所属某个执行模式</param>
        /// <returns>是否播放完成</returns>
        bool OnAnimationUpdate(State state, StateAction stateAction, StateMachineUpdateMode currMode);
    }
}